package org.example.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.core.env.SystemEnvironmentPropertySource;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;


@Service
public class OrderService {
    private UserService userService;
    @Autowired
    private Environment environment;
    @Autowired
    private EnvironmentAware systemEnvironmentPropertySource;

    @PostConstruct
    public void init() {
        System.out.println("init");
    }

    public UserService getUserService() {
        return userService;
    }
    @Autowired
    public void setUserService(UserService userService) {
        System.out.println("set UserService");
        this.userService = userService;
    }

    public OrderService() {
        System.out.println("orderService constructor");
    }
}
